import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import App from './App.vue'
import router from './router'
import COS from 'cos-js-sdk-v5'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.provide("$cos",new COS({
  SecretId: 'AKIDGfJ2W3X0fcZO2VBudIqOqHdqBWiiddVG',
  SecretKey: 'vshedR4X6dBsiVItHrHXaTAgz5Kl7JPN',
}
))
app.provide("$cosConfig",{
  Bucket: 'webexp-1312413594', /* 填写自己的 bucket，必须字段 */
  Region: 'ap-nanjing',     /* 存储桶所在地域，必须字段 */
})
app
  .use(ElementPlus, {
    locale: zhCn
  })
  .use(router)
  .mount('#app')
